<script>
import { h } from 'vue';
import HelloWorld from './HelloWorld.vue'
export default {
    data() {
        return {
            counter: 0
        }
    },
    // // jsx插入对象 使用{}
    render() {
        const increment = () => this.counter++;
        const decrement = () => this.counter--;

        return (
            <div>
                <h2>当前计数：{this.counter}</h2>
                <button onClick={increment}>+1</button>
                <button onClick={decrement}>-1</button>

                <HelloWorld>
                
                    {{default: props => <button>我是传过去的按钮</button>}}
                </HelloWorld>

            </div>
        )
    }
}
</script>
<style>
</style>
